package com.example.bird;

import java.io.IOException;

/**
 * @Auther: yuanjianpeng
 * @Date: 2019/3/19 23:17
 * @Description:
 */
public class Swap extends Bird {
    public Swap(String name) {
        super(name);
    }

    @Override
    public void sing() {
        System.out.println("我可以唱歌");
    }

    @Override
    public void fly() {
        System.out.println("我可以飞更高");
    }

    public void swing() {
        System.out.println("我可以跳舞");
    }

    public boolean dosom(){
        boolean result;
        try {
            Util.DO(this);
            result = true;
        } catch (IOException e) {
            e.printStackTrace();
            result = false;
        }
        return result;
    }
}
